import { service } from "../http/request";

  // 用户登录
  const userLogin = (params) => {
    return service({
      method:'post',
      url:'login',
      data:params
    })
  }

  // 获取当前登录用户信息
  const getAdminInfo = () => {
    return service({
      method:'get',
      url:'admin/info'
    })
  }

  // 退出登录
  const logout = () => {
    return service({
      method: 'post',
      url: '/logout'
    })
  }
  // 获取在线人数
  const getOnline = () => {
    return service({
      method: 'get',
      url: '/online'
    })
  }

  export default {
    userLogin,
    getAdminInfo,
    logout,
    getOnline
  }


